﻿using System.Collections.Generic;
using viNews.Classes;
using viNews.Controllers;
using visinia.SmartEngine.SiteMap;

namespace viNews.HttpHandlers
{
    public class SiteMap : BaseSiteMap
    {
        public override List<SiteMapInfo> GenerateSiteMap()
        {
            List<SiteMapInfo> list = new List<SiteMapInfo>();
            NewsAccessHelper.GetNews(NewsAccessHelper.GetNewsCount()).ForEach(delegate(News news)
            {
                list.Add(new SiteMapInfo("viNews", news.Title, news.Url, news.Date, SiteMapInfo.ChangeFreq.Monthly));                
            });
            return list;
        }
    }
}
